package cl.gob.ips.offline.util;

import java.util.ArrayList;
import java.util.List;

import org.jbpm.taskmgmt.exe.TaskInstance;



public class ParseaTareas {
 
	public static  List<Tarea> parseaSalidaListaTareas(List tareas) {
		 TaskInstance task = new TaskInstance();
		 List<Tarea> listaTarea= new ArrayList<Tarea>();
		 for(int i = 0; i < tareas.size(); i++){
			 task = (TaskInstance) tareas.get(i);
			 Tarea tarea = new Tarea();
			 tarea.setDescripcion(task.getDescription());
			 tarea.setId(String.valueOf(task.getId()));
			 tarea.setNombre(task.getName());
			 tarea.setVariables(task.getVariables());
			 listaTarea.add(tarea);
		 }
		 return listaTarea;
	 }
}
